﻿<Window x:Class="CECB.Dashbord.DashSlideSettings_Window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DashSlideSettings_Window"            xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
       
        Height="650" Width="1200" 
           
        WindowStartupLocation="Manual" 
        Left="60" Top="100"
          Background="#AA000000" AllowsTransparency="True" WindowStyle="None" WindowState="Maximized" >
    <Window.Resources>
        <Storyboard x:Key="Slidetoright">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.001"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.1" Value="1.157">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-40"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle">
                <EasingDoubleKeyFrame KeyTime="0" Value="502.312"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.1" Value="76.874">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-40"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.1" Value="0.8"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.StrokeThickness)" Storyboard.TargetName="rectangle">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="showMe" >
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:3" From="0" To="1"/>
        </Storyboard>

        <Storyboard x:Key="drop">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="groupBox">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.02"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1.194">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-3"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="groupBox">
                <EasingDoubleKeyFrame KeyTime="0" Value="-120"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="23.75">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-3"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="drop1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="groupBoxSearchTeam">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.02"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1.194">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-3"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="groupBoxSearchTeam">
                <EasingDoubleKeyFrame KeyTime="0" Value="-120"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="23.75">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-3"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Slidetoright}"/>
        </EventTrigger>
    </Window.Triggers>

    <Grid x:Name="LayoutRoot" Width="776" Height="597">

 
        <Rectangle x:Name="rectangle"   Stroke="Black" RadiusY="18.5" RadiusX="18.5" RenderTransformOrigin="0.5,0.5" Margin="0,0,-7,113">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Rectangle.RenderTransform>
            <Rectangle.Fill>
                <ImageBrush ImageSource="/CECB;component/images/roundbg.png" />
            </Rectangle.Fill>
        </Rectangle>

        <TabControl Name="settingsTab" TabStripPlacement="Left"  VerticalAlignment="top" HorizontalAlignment="Center" SelectionChanged="TabControl_SelectionChanged" Margin="85,40,42,0" Width="649" Height="405">
            <TabControl.Background>
                <RadialGradientBrush Center="-0.047,0.553" GradientOrigin="-0.047,0.553" RadiusY="1.231" RadiusX="0.8">
                    <GradientStop Offset="0" Color="AliceBlue"/>
                    <GradientStop Offset="2" Color="Transparent"/>
                </RadialGradientBrush>
            </TabControl.Background>
            <TabItem Name="SystemLogin" Visibility="Visible" Header="System Administrator" Foreground="Brown"  Height="40"  Margin="0,0,0,0">
                <TabItem.Content>
                    <Grid Height="349" Width="491">
                        <WrapPanel Name="xx" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,10,0,0" Grid.RowSpan="2" Width="289" Height="276">
                            <StackPanel Height="263" Name="stackPanel1" Width="285">
                                <TextBox Text="Current username" Height="34" Name="textBox1" Width="277" GotFocus="textBox1_GotFocus" />
                                <TextBox Text="Current password" Height="34" Name="textBox2" Width="277" GotFocus="textBox2_GotFocus" />
                                <TextBox Text="New password"  Height="34" Name="textBox3" Width="277" GotFocus="textBox3_GotFocus" />
                                <TextBox Text="Confirm password" Height="34" Name="textBox4" Width="277" GotFocus="textBox4_GotFocus" />

                                <Button Visibility="Visible" HorizontalAlignment="Right" Background="{x:Null}" BorderBrush="White" Click="button1_Click" Height="44"   Name="passwordSaveButton" Width="98">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="13*" />
                                            <RowDefinition Height="23*" />
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Image Height="32" Margin="2,2,2,3" Source="/CECB;component/images/Save.png" Width="32" Grid.RowSpan="2" />
                                        <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2,10,2,11" VerticalAlignment="Center" Grid.RowSpan="2">
                                            <TextBlock Margin="0" Padding="0" Text="Save" TextWrapping="NoWrap" Foreground="Black" />
                                        </StackPanel>
                                    </Grid>
                                </Button>
                            </StackPanel>
                        </WrapPanel>
                    </Grid>
                </TabItem.Content>
            </TabItem>

            <TabItem Name="fontweight1" Header="Insert Components" Foreground="Brown"   Height="40"  Margin="0,0,0,0">
                <TabItem.Content>
                    <Grid>
                        <StackPanel Background="Gray" Orientation="Vertical"  Margin="54,43,27,0" Name="stackPanel2" Height="76" VerticalAlignment="Top" >
                           
                            <StackPanel Orientation="Horizontal">
                                <TextBox Grid.Column="2" Width="357" Margin="0,4,0,0"  Height="34" TextWrapping="Wrap" AcceptsReturn="True" Name="textBoxcomponents" VerticalAlignment="Top" FontSize="15" Background="#FFF0F0F0" Opacity="1" HorizontalAlignment="Center" Foreground="Black" GotFocus="textBoxcomponents_GotFocus" />


                                <Button Visibility="Visible"   Background="{x:Null}" BorderBrush="White" Click="SaveButton_Click" Height="44"   Name="SaveButton" Width="74">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="13*" />
                                            <RowDefinition Height="23*" />
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Image Height="32" Margin="2,2,2,3" Source="/CECB;component/images/Save.png" Width="32" Grid.RowSpan="2" />
                                        <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2,10,2,11" VerticalAlignment="Center" Grid.RowSpan="2">
                                            <TextBlock Margin="0" Padding="0" Text="Save" TextWrapping="NoWrap" Foreground="White" />
                                        </StackPanel>
                                    </Grid>
                                </Button>
                                <Button HorizontalAlignment="Right" Margin="-110,0,0,0" Visibility="Hidden" Background="{x:Null}" BorderBrush="White" Click="UpdateButton_Click" Height="44"   Name="UpdateButton" Width="98">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="13*" />
                                            <RowDefinition Height="23*" />
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Image Height="32" Margin="2,2,2,3" Source="/CECB;component/images/Save.png" Width="32" Grid.RowSpan="2" />
                                        <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2,10,2,11" VerticalAlignment="Center" Grid.RowSpan="2">
                                            <TextBlock Margin="0" Padding="0" Text="Update" TextWrapping="NoWrap" Foreground="White" />
                                        </StackPanel>
                                    </Grid>
                                </Button>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,0" Background="#FF3E3832" >
                                <TextBlock Height="25" Name="textBlock23" Text="Select Component: " TextAlignment="Right"  FontSize="18" Foreground="White"  Margin="0,0,0,0" Width="162"  />
                                <ComboBox Height="23" Name="comboBoxComponents" Width="243" Margin="0,0,0,0" DisplayMemberPath="cmpt_mainCat" SelectedValuePath="cmpt_reference" />
                            </StackPanel>
                        </StackPanel>

                        <StackPanel Height="267" HorizontalAlignment="Left" Margin="55,125,0,0" Name="stackPanel3" VerticalAlignment="Top" Width="451" >

                            <ListBox x:Name="listBoxComponents" HorizontalAlignment="Left"  Margin="0,0,0,0" Visibility="Visible" ScrollViewer.CanContentScroll="True"  ItemsSource="{Binding }"  ScrollViewer.VerticalScrollBarVisibility="auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" Height="266" Background="DimGray" Width="435" SelectionChanged="listBoxActivities_SelectionChanged">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <WrapPanel Background="#FF3E3832" Width="600" >
                                            <StackPanel Orientation="Horizontal" >
                                                <!--<CheckBox IsChecked="{Binding Deleteable, Mode=TwoWay}" Name="CheckBoxActivity" VerticalAlignment="Center" HorizontalAlignment="Left"  />-->
                                                <WrapPanel Orientation="Vertical" >
                                                    <Label Content="{Binding cmpt_name }" Height="30" Width="600" Foreground="White"   HorizontalAlignment="Left" FontSize="16" />
                                                    <Label Content="{Binding cmpt_mainCat }" Height="30" Width="600" Foreground="White"   HorizontalAlignment="Left" FontSize="12" />
                                                    <!--Label Content="{Binding impt_reference}" Height="22" Width="300" Foreground="White"   HorizontalAlignment="Right" FontSize="10" /> -->

                                                </WrapPanel>
                                            </StackPanel>
                                        </WrapPanel>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>

                        </StackPanel>
                        <StackPanel Height="44" HorizontalAlignment="Left" Margin="565,406,0,0" Name="stackPanel4" VerticalAlignment="Top" Width="146" >
                            <Button Background="{x:Null}" BorderBrush="White" Click="DeleteButton_Click" Height="44" Margin="2,0" Name="DeleteButton" Width="98">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Image Grid.Column="0" Height="32" Margin="2" Source="/CECB;component/images/Close.png" Width="32" />
                                    <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                                        <TextBlock Margin="0" Padding="0" Text="Delete" TextWrapping="NoWrap" Foreground="Black" />
                                    </StackPanel>
                                </Grid>
                            </Button>
                        </StackPanel>
                        <StackPanel Height="33" HorizontalAlignment="Left" Margin="9,8,0,0" Name="stackPanel5" VerticalAlignment="Top" Width="445" >

                            <TextBlock Height="28" HorizontalAlignment="Left" Margin="5,0,0,0" Name="lblname"   VerticalAlignment="Top" FontSize="20" Foreground="Black" FontStyle="Italic" FontWeight="ExtraBold" Width="auto" Grid.Column="1" Grid.RowSpan="2" />

                        </StackPanel>
                    </Grid>
                </TabItem.Content>
            </TabItem>
            <TabItem Name="fontsize1" Header="System Settings" Foreground="Brown"   Height="40"  Margin="0,0,0,0">
                <TabItem.Content>
                    <StackPanel Orientation="Vertical">
                        <Grid>
                            <StackPanel Height="36" HorizontalAlignment="Left" Margin="21,20,0,0" Name="stackPanel6" VerticalAlignment="Top" Width="452">
                                <TextBlock Height="28" HorizontalAlignment="Left" Margin="5,0,0,0" Text="Email Settings"   VerticalAlignment="Top" FontSize="20" Foreground="Black" FontStyle="Italic" FontWeight="ExtraBold" Width="auto" Grid.Column="1" Grid.RowSpan="2" />
                            </StackPanel>
                            <GroupBox Margin="22,80,26,0" >
                                <StackPanel Orientation="Vertical" Height="198" HorizontalAlignment="Left" Name="stackPanel7" VerticalAlignment="Top" Width="451" >
                                    <StackPanel Orientation="Horizontal">
                                        <Label Content="Current Email Address " Width="157"></Label>
                                        <TextBlock Name="tbxEmail" Width="241"></TextBlock>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <Label Content="New Email Address " Width="157"></Label>
                                        <TextBox Name="tbxNewEmail" Width="240"></TextBox>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <Label Content="Password " Width="157"></Label>
                                        <PasswordBox Name="tbxNewEmailPass" Width="240"></PasswordBox>

                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <Button Background="{x:Null}" Margin="310,0,0,0" BorderBrush="White" Click="SaveButtonEmail_Click" Height="44"   Name="SaveButtonEmail" Width="86">
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Image Grid.Column="0" Height="32" Margin="2" Source="/CECB;component/images/Save.png" Width="32" />
                                                <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                                                    <TextBlock Margin="0" Padding="0" Foreground="Black" Text="Save" TextWrapping="NoWrap" />
                                                </StackPanel>
                                            </Grid>
                                        </Button>

                                    </StackPanel>
                                </StackPanel>
                            </GroupBox>
                            
                        </Grid>
                        <GroupBox Margin="0,20,0,0" Width="469">
                            <StackPanel Orientation="Vertical" HorizontalAlignment="Left"  Name="stackPaanel6" VerticalAlignment="Top" Width="452">
                                <TextBlock Height="28" HorizontalAlignment="Left" Margin="5,0,0,0" Text="Excel Files Settings"   VerticalAlignment="Top" FontSize="20" Foreground="Black" FontStyle="Italic" FontWeight="ExtraBold" Width="auto" Grid.Column="1" Grid.RowSpan="2" />
                                <TextBlock Text="Set the file path where auto genarated excel files are to save: "></TextBlock>
                                <StackPanel Orientation="Horizontal">
                                    
                                    <TextBox HorizontalAlignment="Left" Margin="0,5,0,0" Name="TextBoxExcelPath" Width="342" Height="25" IsReadOnly="True"></TextBox>
                                    <Button Content="Browse" Width="48" Height="30" Margin="5,0,0,0" Name="ButtonFolderPath" Click="ButtonFolderPath_Click"></Button>
                                    <Button Name="ButtonSaveExcelPath" Width="50" Margin="10,0,0,0" Content="Save" Click="ButtonSaveExcelPath_Click"></Button>
                                </StackPanel>

                            </StackPanel>
                        </GroupBox>

                    </StackPanel>
                </TabItem.Content>
            </TabItem>
            <TabItem Name="fontsize2" Visibility="Visible" Header="Members Settings" Foreground="Brown" FontWeight="Normal" Height="40"  Margin="0,0,0,0">
                <TabItem.Content>
                    <StackPanel Orientation="Vertical">
                        
                        <Label Content="Member Activations"></Label>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock FontSize="15" Foreground="Black" Height="23" Name="textBlock3" Text="Search Member" Width="142" />
                            <toolkit:AutoCompleteBox Name="MemberAutocompleteTextBox"  Width="270" Margin="10, 0,0,0" Height="30"  ValueMemberPath="mem_name"  FilterMode="Contains"  ItemsSource="{Binding}"  TabIndex="1" IsTabStop="True"  SelectionChanged="MemberAutocompleteTextBox_SelectionChanged_1" FontSize="16" Background="White" Opacity="1" HorizontalAlignment="Center" UseLayoutRounding="False" BorderBrush="#FFF8F8F8" BorderThickness="2">
                                <toolkit:AutoCompleteBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding Path=mem_reference}"/>
                                            <TextBlock Text=" - "/>
                                            <TextBlock Text="{Binding Path=mem_name}"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </toolkit:AutoCompleteBox.ItemTemplate>
                            </toolkit:AutoCompleteBox>
                        </StackPanel>
                        <StackPanel Height="200">
                            
                        </StackPanel>
                        <StackPanel Height="100" Orientation="Horizontal">
                            <CheckBox Content="Is Active" Height="18" Margin="200,0,0,0" Padding="0,0,0,0"  Name="checkBox1" Width="87" />
                            <Button Content="Save" Height="29" Name="ButtonSaveMemberDeactivate" Click="ButtonSaveMemberDeactivate_Click" Width="75">
                                <Button.Background>
                                    <ImageBrush />
                                </Button.Background>
                            </Button>
                        </StackPanel>
                    </StackPanel>
                </TabItem.Content>
            </TabItem>
            <TabItem Name="projectSettings" Visibility="Visible" Header="Project Settings" Foreground="Brown" FontWeight="Normal" Height="40"  Margin="0,0,0,0">
                <TabItem.Content>
                    <StackPanel Orientation="Vertical">
                        <Label Content="Project Activations"></Label>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock FontSize="15" Foreground="Black" Height="23" Name="textBlocka" Text="Search Project" Width="142" />
                            <toolkit:AutoCompleteBox Name="ProjectAutocompleteTextBox1"  Width="270" Margin="10, 0,0,0" Height="30"  ValueMemberPath="proj_name"  FilterMode="Contains"  ItemsSource="{Binding}"  TabIndex="1" IsTabStop="True"  SelectionChanged="ProjectAutocompleteTextBox_SelectionChanged" FontSize="16" Background="White" Opacity="1" HorizontalAlignment="Center" UseLayoutRounding="False" BorderBrush="#FFF8F8F8" BorderThickness="2">
                                <toolkit:AutoCompleteBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding Path=proj_reference}"/>
                                            <TextBlock Text=" - "/>
                                            <TextBlock Text="{Binding Path=proj_name}"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </toolkit:AutoCompleteBox.ItemTemplate>
                            </toolkit:AutoCompleteBox>

                        </StackPanel>
                        
                        <StackPanel Height="100" Orientation="Horizontal">
                            <CheckBox Content=" Dectivate" Height="18" Margin="150,0,0,0" Padding="0,0,0,0"  Name="checkBoxDeactivate" Width="87" />
                            <Button Content="Save" Height="30" Name="ButtonSaveProject" Margin="110,0,0,0" Click="ButtonSaveProject_Click" Width="75">
                                <Button.Background>
                                    <ImageBrush />
                                </Button.Background>
                            </Button>
                        </StackPanel>
                    </StackPanel>
                </TabItem.Content>
            </TabItem>
            <TabItem Name="SystemSettings" Visibility="Collapsed" Header="Project Settings" Foreground="Brown" FontWeight="Normal" Height="40"  Margin="0,0,0,0">
                <TabItem.Content>
                    <StackPanel Orientation="Vertical">
                        <Label Content="Project Activations"></Label>
                       
                    </StackPanel>
                </TabItem.Content>
            </TabItem>
        </TabControl>

        
        <Button BorderBrush="{x:Null}" VerticalAlignment="Top" Width="40" Height="40"   Margin="740,40,0,0" Background="Transparent" Click="CloseButton_Click" Cursor="Hand" Name="CloseButton"    >
            <Grid  >
                <Image Height="32" Margin="2" Source="/CECB;component/images/closeblack.png" Width="32" />
            </Grid>
        </Button>
    </Grid>
</Window>